package com.qianfeng.ttgy;

import android.app.Application;

import com.lidroid.xutils.bitmap.BitmapGlobalConfig;
import com.lidroid.xutils.cache.MD5FileNameGenerator;

/**
 * Created by Administrator on 2015/8/4.
 */
public class BaseApp extends Application {
    private  static BaseApp app;
    private boolean netState;
    @Override
    public void onCreate() {
        super.onCreate();
        initBitmapGolbalConfig();
        app = this;
    }
    public static BaseApp getInstance(){
        return app;
    }

    public boolean isNetState() {
        return netState;
    }

    public void setNetState(boolean netState) {
        this.netState = netState;
    }

    private void initBitmapGolbalConfig() {
        BitmapGlobalConfig config = BitmapGlobalConfig.getInstance(this,"qianfeng/image");
        config.setFileNameGenerator(new MD5FileNameGenerator());

    }

}
